-- GENERATED SPELL FOR [Shivan Assassin] --


function spell0_23220(pUnit, Event) --@Aspect of the Flame,Self--
pUnit:FullCastSpellOnTarget(41593,pUnit)
pUnit:RegisterEvent('Sorts_23220', 1300, 1)
end

function spell1_23220(pUnit, Event) --@Aspect of the Ice,Self--
pUnit:FullCastSpellOnTarget(41594,pUnit)
pUnit:RegisterEvent('Sorts_23220', 1300, 1)
end

function spell2_23220(pUnit, Event) --@Aspect of the Shadow,Self--
pUnit:FullCastSpellOnTarget(41595,pUnit)
pUnit:RegisterEvent('Sorts_23220', 1300, 1)
end

function spell3_23220(pUnit, Event) --@Chaos Strike,n/a--
pUnit:FullCastSpellOnTarget(40741,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23220', 0, 1)
end

function spell4_23220(pUnit, Event) --@Chaos Strike,n/a--
pUnit:FullCastSpellOnTarget(41964,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23220', 2500, 1)
end

function spell5_23220(pUnit, Event) --@Cleansing Flame,Self--
pUnit:FullCastSpellOnTarget(41589,pUnit)
pUnit:RegisterEvent('Sorts_23220', 0, 1)
end

function spell6_23220(pUnit, Event) --@Death Blast,n/a--
pUnit:FullCastSpellOnTarget(40736,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23220', 2500, 1)
end

function spell7_23220(pUnit, Event) --@Flame Buffet,n/a--
pUnit:FullCastSpellOnTarget(41596,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23220', 0, 1)
end

function spell8_23220(pUnit, Event) --@Ice Block,Self--
pUnit:FullCastSpellOnTarget(41590,pUnit)
pUnit:RegisterEvent('Sorts_23220', 4000, 1)
end

function spell9_23220(pUnit, Event) --@Iceblast,n/a--
pUnit:FullCastSpellOnTarget(41579,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23220', 2500, 1)
end

function spell10_23220(pUnit, Event) --@Icy Leap,Self--
pUnit:FullCastSpellOnTarget(40727,pUnit)
pUnit:RegisterEvent('Sorts_23220', 8000, 1)
end

function spell11_23220(pUnit, Event) --@Pyroblast,n/a--
pUnit:FullCastSpellOnTarget(41578,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23220', 2500, 1)
end

function spell12_23220(pUnit, Event) --@Shadow Nova,Self--
pUnit:FullCastSpellOnTarget(40737,pUnit)
pUnit:RegisterEvent('Sorts_23220', 15000, 1)
end

function spell13_23220(pUnit, Event) --@Siphon Life,Drain--
pUnit:FullCastSpellOnTarget(41597,pUnit:GetRandomPlayer(0))
pUnit:RegisterEvent('Sorts_23220', 0, 1)
end

function Sorts_23220(pUnit, Event)
local choix_sorts_23220 = math.random(0, 13)
if choix_sorts_23220 == 0 then
pUnit:RegisterEvent('spell0_23220', 1, 1)
end
if choix_sorts_23220 == 1 then
pUnit:RegisterEvent('spell1_23220', 1, 1)
end
if choix_sorts_23220 == 2 then
pUnit:RegisterEvent('spell2_23220', 1, 1)
end
if choix_sorts_23220 == 3 then
pUnit:RegisterEvent('spell3_23220', 1, 1)
end
if choix_sorts_23220 == 4 then
pUnit:RegisterEvent('spell4_23220', 1, 1)
end
if choix_sorts_23220 == 5 then
pUnit:RegisterEvent('spell5_23220', 1, 1)
end
if choix_sorts_23220 == 6 then
pUnit:RegisterEvent('spell6_23220', 1, 1)
end
if choix_sorts_23220 == 7 then
pUnit:RegisterEvent('spell7_23220', 1, 1)
end
if choix_sorts_23220 == 8 then
pUnit:RegisterEvent('spell8_23220', 1, 1)
end
if choix_sorts_23220 == 9 then
pUnit:RegisterEvent('spell9_23220', 1, 1)
end
if choix_sorts_23220 == 10 then
pUnit:RegisterEvent('spell10_23220', 1, 1)
end
if choix_sorts_23220 == 11 then
pUnit:RegisterEvent('spell11_23220', 1, 1)
end
if choix_sorts_23220 == 12 then
pUnit:RegisterEvent('spell12_23220', 1, 1)
end
if choix_sorts_23220 == 13 then
pUnit:RegisterEvent('spell13_23220', 1, 1)
end
end

function mob23220_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23220', math.random(1500, 3000), 1)
end

function mob23220_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23220_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23220_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23220, 1, 'mob23220_Action')
RegisterUnitEvent(23220, 2, 'mob23220_Leave')
RegisterUnitEvent(23220, 3, 'mob23220_Kill')
RegisterUnitEvent(23220, 4, 'mob23220_Die')
